<layout name='Layout/layout_page' />
	<ol class="breadcrumb">
		<li><a href="<{:U('Member/index')}>">会员管理</a></li>
      	<li class="active">列表</li>
    </ol>
	
	<form class="form-inline" method="get" action="index.php">
  		<div class="form-group">
  			<label>会员编号</label>
    		<input type="text" class="form-control input-sm" name="key">
    		<label>昵称</label>
    		<input type="text" class="form-control input-sm" name="wxname">
  		</div>
		<button type="submit" class="btn btn-default btn-sm">搜索</button>
		<input type="hidden" name="g" value="Admin" />
		<input type="hidden" name="m" value="Member" />
		<input type="hidden" name="a" value="index" />
	</form>

	<p></p>
	
	<form id="ajaxForm" method="post" action="<{:U('Member/del')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-striped table-bordered table-hover">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> 全选</TH>
		  <TH>会员编号</TH>		  
		  <TH>类型</TH>		  
		  <TH>头像</TH>
		  <TH>昵称</TH>
		  <TH>微信ID</TH>
		  <TH>上级</TH>
		  <TH>一级会员购买</TH>
		  <TH>是否关注</TH>
		  <TH>是否消费</TH>
		  <TH>可提佣金</TH>
		  <TH>关注日期</TH>
		  <TH>操作</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"></td>
			  <td><{$vo.id}></td>			  
			  <td><switch name="vo.userType" >
				<case value="0">普通用户</case>
				<case value="1"><font color="green">业务员</font></case>
				<case value="2"><font color="blue">商家</font></case>
				</switch>
				<a href="javascript:void(0)" onclick="showModel('<{:U('Member/edit' , array('wxid'=>$vo['wxid']))}>')"><i class="glyphicon glyphicon-pencil"></i></a>
				</td>			  
			  <td><img src="<{$vo.wxface}>" style="height:30px;"></td>
			  <td><{$vo.wxname}></td>
              <td><{$vo.wxid}></td>
              <td><{$vo.father}></td>
              <td><{$vo.buyUser}></td>
              <td><eq name="vo.guanzhu" value="1"><font color="blue">已关注</font><else/>未关注</eq></td>
              <td><eq name="vo.userGroup" value="1"><font color="blue">已消费</font><else/>未消费</eq></td>
              <td><{$vo.money}>元</td>
              <td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
			  <td>
			  	<a href="<{:U('Myuser/index' , array('wxid'=>$vo['wxid']))}>" class="btn btn-default btn-sm">推广</a>
			  	<a href="<{:U('Yongjin/index' , array('userid'=>$vo['id']))}>" class="btn btn-default btn-sm">佣金</a>
			  	<a href="<{:U('Order/index' , array('userid'=>$vo['id']))}>" class="btn btn-default btn-sm">订单</a>
			  	<a href="<{:U('Tixian/index' , array('userid'=>$vo['id']))}>" class="btn btn-default btn-sm">提现申请</a>	
			  </td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('删除后不可恢复！确定吗？'))return false;"><i class="glyphicon glyphicon-trash"></i> 删除选中信息</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<script>
function showModel(remote){
  $('#myModal').modal({
    remote : remote
  });

  $("#myModal").on("hidden.bs.modal", function() {
    $(this).removeData("bs.modal");
  })
}
</script>     
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
      <div class="modal-content"></div>
  </div>
</div>

<input type="hidden" id="menu_action" value="user" />